package com.whfc.ms.api.safety.service.impl;

import com.whfc.common.result.PageData;
import com.whfc.ms.api.safety.service.MsSafetyIssueService;
import com.whfc.safety.dto.SafetyIssueDTO;
import com.whfc.safety.dto.SafetyIssueTypeDTO;
import com.whfc.safety.param.SafetyIssueAddParam;
import com.whfc.safety.param.SafetyIssueEditParam;
import com.whfc.safety.param.SafetyIssueTypeAddParam;
import com.whfc.safety.param.SafetyIssueTypeEditParam;
import com.whfc.safety.service.SafetyIssueService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 质量问题库 service
 *
 * @author : qzexing
 * @version : 1.0
 * @date : 2020-07-30 18:49
 */
@Service
public class MsSefatyIssueServiceImpl implements MsSafetyIssueService {

    @DubboReference(interfaceClass = SafetyIssueService.class, version = "1.0.0")
    private SafetyIssueService safetyIssueService;

    @Override
    public List<SafetyIssueTypeDTO> issueTypeList(Integer deptId, String keyword) {
        return safetyIssueService.issueTypeList(deptId, keyword);
    }

    @Override
    public void addIssueType(SafetyIssueTypeAddParam addParam) {
        safetyIssueService.addIssueType(addParam);
    }

    @Override
    public void editIssueType(SafetyIssueTypeEditParam editParam) {
        safetyIssueService.editIssueType(editParam);
    }

    @Override
    public void delIssueType(Long issueTypeId) {
        safetyIssueService.delIssueType(issueTypeId);
    }

    @Override
    public List<SafetyIssueDTO> issueList(Long issueTypeId) {
        return safetyIssueService.issueList(issueTypeId);
    }

    @Override
    public PageData<SafetyIssueDTO> issueList(Long issueTypeId, Integer pageNum, Integer pageSize) {
        return safetyIssueService.issueList(issueTypeId, pageNum, pageSize);
    }

    @Override
    public void addIssue(SafetyIssueAddParam addParam) {
        safetyIssueService.addIssue(addParam);
    }

    @Override
    public void editIssue(SafetyIssueEditParam editParam) {
        safetyIssueService.editIssue(editParam);
    }

    @Override
    public void delIssue(Long issueId) {
        safetyIssueService.delIssue(issueId);
    }

    @Override
    public void disableOrEnabledIssue(Long issueId, Integer enable) {
        safetyIssueService.disableOrEnabledIssue(issueId, enable);
    }

    @Override
    public List<SafetyIssueDTO> issueList(Integer deptId) {
        return safetyIssueService.issueList(deptId);
    }

    @Override
    public void deleteBatch(List<Integer> idList) {
        safetyIssueService.deleteBatch(idList);
    }
}
